<?php
include_once("../global.php");
header("Content-type: text/html;charset=GB2312");

$q = trim( strtolower($_GET["q"]) );
$q = mb_convert_encoding ($q, 'GB2312' ,'UTF-8');

$sql="SELECT DISTINCT customer_id from dordermsg WHERE 1=1 ";

if(!empty($q)) $sql .=" and customer_id like '%".$q."%'";
$sql .=" ORDER BY customer_id DESC";

$RecordSet=$db->get_sql_arr($sql,'mysql_fetch_assoc');

if(is_array($RecordSet))
{
	foreach ($RecordSet as $ona) {
			echo "$ona[customer_id]\n";
		
	}
}

?>